﻿namespace _4_NovaAdmin.Web.Core.Authorizations;

public class PolicyRequirement : IAuthorizationRequirement
{
    /// <summary>
    /// User rights collection
    /// </summary>
    //public List<UserPermission> UserPermissions { get; set; }
    /// <summary>
    /// No permission action
    /// </summary>
    public string DeniedAction { get; set; }
    /// <summary>
    /// structure
    /// </summary>
    public PolicyRequirement()
    {
        //Jump to this route without permission
        DeniedAction = new PathString("/api/nopermission");
        //Route configuration that users have access to, of course you can read it from the database, you can also put it in Redis for persistence
        //UserPermissions = new List<UserPermission>() { };
    }
}

